package com.kelvin.common.entity.http;

import lombok.Data;
import javax.servlet.http.HttpServletResponse;

/***
 * @title ResultUtil
 * @desctption <TODO description class purpose>
 * @author LTF
 * @create 2023/2/28 14:26
 **/
@Data
public class ResultUtil<T> {

    private int code;

    private String message;

    private T data;

    public ResultUtil buildSuccess(T data) {
        this.code = HttpServletResponse.SC_OK;
        this.message = "success";
        this.data = data;
        return this;
    }
}
